﻿<%@ Page Language="C#" MasterPageFile="~/MasterPages/Guest.Master" AutoEventWireup="true"
    CodeBehind="ThongTin.aspx.cs" Inherits="Ryder_US_Website.Presentation.Guest.ThongTin"
    Title="Thông tin cá nhân" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <script language="javascript" type="text/javascript">
        function checkChbChangePassword() {
            var chbChangePassword = document.getElementById('<%= chbMatKhau.ClientID %>');
            var txtNewPassword = document.getElementById('<%= txtMatKhau.ClientID %>');
            if (chbChangePassword.checked == false)
                txtNewPassword.value = "";
            txtNewPassword.disabled = !chbChangePassword.checked;
        }

        function validateForm() {
            if (document.getElementById('<%= txtHoTen.ClientID %>').value == "" || document.getElementById('<%= txtHoTen.ClientID %>').value.length < 1) {
                alert("Họ tên không được để trống");
                document.getElementById('<%= txtHoTen.ClientID %>').focus();
            }
            else if (document.getElementById('<%= chbMatKhau.ClientID %>').checked && (document.getElementById('<%= txtMatKhau.ClientID %>').value == "" || document.getElementById('<%= txtMatKhau.ClientID %>').value.length < 1)) {
                alert("Mật khẩu không được để trống");
                document.getElementById('<%= txtMatKhau.ClientID %>').focus();
            }
            else if (document.getElementById('<%= txtDiaChi.ClientID %>').value == "" || document.getElementById('<%= txtDiaChi.ClientID %>').value.length < 1) {
                alert("Địa chỉ không được để trống");
                document.getElementById('<%= txtDiaChi.ClientID %>').focus();
            }
            else if (document.getElementById('<%= txtDienThoai.ClientID %>').value == "" || document.getElementById('<%= txtDienThoai.ClientID %>').value.length < 1) {
                alert("Điện thoại không được để trống");
                document.getElementById('<%= txtDienThoai.ClientID %>').focus();
            }
            else if (document.getElementById('<%= txtTaiKhoan.ClientID %>').value == "" || document.getElementById('<%= txtTaiKhoan.ClientID %>').value.length < 1) {
                alert("Tài khoản ngân hàng không được để trống");
                document.getElementById('<%= txtTaiKhoan.ClientID %>').focus();
            }
            else
                return true;
            return false;
        }
    </script>

    <h1 class="title">
        <asp:Label ID="lbUpdateInfo" runat="server" Text="UpdateInfo"></asp:Label>
    </h1>
    <p>
    </p>
    <form id="MainForm" method="post" action="" name="MainForm">
    <table style="width: 91%;" align="center">
        <tr>
            <td colspan="4" class="style1">
                <p>
                </p>
            </td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Label ID="lbTenDangNhap" runat="server" Text="Username" Font-Size="Medium"></asp:Label>
            </td>
            <td class="style1">
                &nbsp;
            </td>
            <td colspan="2" class="style1">
                &nbsp;
                <asp:Label ID="lblUsername" runat="server" Text="Tên đăng nhập" Font-Size="Medium"></asp:Label>
            </td>
        </tr>
        <tr>
            <td colspan="4" class="style1">
                <p>
                </p>
            </td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Label ID="lbHoTen" runat="server" Text="Fullname" Font-Size="Medium"></asp:Label>
            </td>
            <td class="style1">
                &nbsp;
            </td>
            <td colspan="2" class="style1">
                <asp:TextBox ID="txtHoTen" runat="server" Width="350px" Font-Size="Medium"></asp:TextBox>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td colspan="4" class="style1">
                <p>
                </p>
            </td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Label ID="lbMatKhau" runat="server" Text="Password" Font-Size="Medium"></asp:Label>
            </td>
            <td class="style1">
                &nbsp;
            </td>
            <td colspan="2" class="style1">
                <asp:TextBox ID="txtMatKhau" runat="server" TextMode="Password" Width="230px" Font-Size="Medium"
                    Enabled="False"></asp:TextBox>
                &nbsp;
                                <asp:CheckBox ID="chbMatKhau" runat="server" Text="ChangePass" AutoPostBack="false"
                    Checked="false" Font-Size="Medium" OnClick="checkChbChangePassword()" />
            </td>
        </tr>
        <tr>
            <td colspan="4" class="style1">
                <p>
                </p>
            </td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Label ID="lbKhoanNo" runat="server" Text="Debt" Font-Size="Medium"></asp:Label>
            </td>
            <td class="style1">
                &nbsp;
            </td>
            <td colspan="2" class="style1">
                <asp:Label ID="LabelKhoanNo" runat="server" Text="Debt" Font-Size="Medium"></asp:Label>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td colspan="4" class="style1">
                <p>
                </p>
            </td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Label ID="lbDiaChi" runat="server" Text="Address" Font-Size="Medium"></asp:Label>
            </td>
            <td class="style1">
                &nbsp;
            </td>
            <td colspan="2" class="style1">
                <asp:TextBox ID="txtDiaChi" runat="server" Width="350px" Font-Size="Medium"></asp:TextBox>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td colspan="4" class="style1">
                <p>
                </p>
            </td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Label ID="lbDienThoai" runat="server" Text="Phone" Font-Size="Medium"></asp:Label>
            </td>
            <td class="style1">
                &nbsp;
            </td>
            <td colspan="2" class="style1">
                <asp:TextBox ID="txtDienThoai" runat="server" Width="350px" Font-Size="Medium"></asp:TextBox>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td colspan="4" class="style1">
                <p>
                </p>
            </td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Label ID="lbTaiKhoan" runat="server" Text="Account" Font-Size="Medium"></asp:Label>
            </td>
            <td class="style1">
                &nbsp;
            </td>
            <td colspan="2" class="style1">
                <asp:TextBox ID="txtTaiKhoan" runat="server" Width="350px" Font-Size="Medium"></asp:TextBox>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td colspan="4" class="style1">
                <p>
                </p>
            </td>
        </tr>
        <tr>
            <td colspan="2">
            </td>
            <td colspan="2">
                <asp:Button ID="btnCapNhat" runat="server" Text="Update" CssClass="button" OnClientClick="return validateForm();"
                    OnClick="btnCapNhat_Click" />&nbsp;
                <asp:Button ID="btnHuy" runat="server" Text="Cancel" CssClass="button" OnClick="btnHuy_Click" />
            </td>
        </tr>
    </table>
    </form>
</asp:Content>
